package Error;

import java.io.FileNotFoundException;
import java.io.IOException;

public class test {
    public static void main(String[] args) {
        m3();

        try {
            m2();
        } catch (FileNotFoundException e) {
            System.out.println("Handled m2 in main");
        } catch (IOException e) {
            System.out.println("Handled m1 in main");
        }
    }

    public static void m3() {
        try {
            m2();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void m2() throws IOException, FileNotFoundException {
        m1();
        throw new FileNotFoundException();
    }

    public static void m1() throws IOException {
        throw new IOException();
    }
}
